//密码加密
var bcrypt = require('bcryptjs');
//暴露出加密方法
exports.bcryption = function(psw){
    //shen
    var salt = bcrypt.genSaltSync(10);
    var hash = bcrypt.hashSync(psw, salt);
    return hash
}
//暴露出解密方法是否匹配
exports.verification = function(psw,hash){
    let flag = bcrypt.compareSync(psw,hash); // true 
    return flag;
}